function Combobox(comboDiv) {
    this.comboDiv = comboDiv;
}

Combobox.prototype.toString = function() {
    return "Combobox";
}

Combobox.prototype.onReady = function() {
    var $combo = jQuery(this.comboDiv).find("select[selectType=vscombo]");

    var options = {};

    //如果存在onchange事件，则给options赋值
    if ($combo.attr("chang")) {
        options["onChange"] = $combo.attr("chang");
    }

    //如果存在editable属性，则给options赋值
    if ($combo.attr("editable")) {
        if ($combo.attr("editable") === "true") {
            options["editable"] = true;
        } else if ($combo.attr("editable") === "false") {
            options["editable"] = false;
        }
    }

    if ($combo.attr("cheight")) {
        options['listHeight'] = $combo.attr('cheight');
    }

    using('combobox', function() {
        $combo.combobox(options);
    })
}

/**
 *取得当前值
 */
Combobox.prototype.getValue = function() {
    return $(this.comboDiv).find("select[selectType=vscombo]").combobox('getValue');
}

/**
 * 设置当前值
 * @param v 当前值对应的value
 */
Combobox.prototype.setValue = function(v) {
    return $(this.comboDiv).find("select[selectType=vscombo]").combobox('setValue', v);
}